<html>
<head><meta charset="utf-8"><title>trait resolution regression #60010 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html">trait resolution regression #60010</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164539556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539556">(Apr 30 2019 at 13:41)</a>:</h4>
<p>This topic is discussion regarding "april 2018 trait resolution regression <a href="https://github.com/rust-lang/rust/issues/60010" target="_blank" title="https://github.com/rust-lang/rust/issues/60010">#60010</a>"</p>



<a name="164539583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539583">(Apr 30 2019 at 13:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> the detail I was trying to outline, about composing constraints, is in this comment here: <a href="https://github.com/rust-lang/rust/issues/60010#issuecomment-484028251" target="_blank" title="https://github.com/rust-lang/rust/issues/60010#issuecomment-484028251">https://github.com/rust-lang/rust/issues/60010#issuecomment-484028251</a></p>



<a name="164539655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539655">(Apr 30 2019 at 13:42)</a>:</h4>
<p>where I found it odd that the code would compile if you have either <code>T: RefUnwindSafe</code> or <code>T: HasQueryGroup</code> on their own.</p>



<a name="164539661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539661">(Apr 30 2019 at 13:42)</a>:</h4>
<p>but putting them both on as a constraint would not allow the code to compile</p>



<a name="164539697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539697">(Apr 30 2019 at 13:43)</a>:</h4>
<p>I think my basic reading of <a href="https://github.com/rust-lang/rust/issues/60010#issuecomment-484254588" target="_blank" title="https://github.com/rust-lang/rust/issues/60010#issuecomment-484254588">your response</a>, is that I should <em>not</em> generally expect these things to compose in every case</p>



<a name="164539782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539782">(Apr 30 2019 at 13:44)</a>:</h4>
<p>i.e. in some situations, even if the code compiles with <code>where T: A</code>, and separately with <code>where T: B</code>, that does not mean it will compile with the composition <code>where T: A, T: B</code></p>



<a name="164539828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164539828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164539828">(Apr 30 2019 at 13:44)</a>:</h4>
<p>but I just wanted to double-check that this is indeed the correct general conclusion (i.e. that one should not expect that particular compositional property to hold when one is dealing with the mix of inductive and co-inductive reasoning that rustc uses)</p>



<a name="164540214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164540214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164540214">(Apr 30 2019 at 13:50)</a>:</h4>
<p>I certainly did expect this property to hold; TIL! (but I also didn't take coinductive stuff into account)</p>



<a name="164543653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164543653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164543653">(Apr 30 2019 at 14:31)</a>:</h4>
<p>is there a minimal example?</p>



<a name="164545974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164545974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164545974">(Apr 30 2019 at 14:58)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> the best I was able to do is written in the issue</p>



<a name="164546034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164546034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164546034">(Apr 30 2019 at 14:58)</a>:</h4>
<p>(in the second comment)</p>



<a name="164555723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164555723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164555723">(Apr 30 2019 at 17:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> Hmm, well, I'm not sure if that is a valid takeaway from my comment.</p>



<a name="164555770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164555770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164555770">(Apr 30 2019 at 17:04)</a>:</h4>
<p>I'll have to dig into this particular example more deeply</p>



<a name="164555857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164555857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164555857">(Apr 30 2019 at 17:05)</a>:</h4>
<p>It is true that having a setup where:</p>
<ul>
<li>coinductive predicate C1 requires</li>
<li>inductive predicate I1 requires </li>
<li>coinductive predicate C1 </li>
</ul>
<p>is not provable, at least in the present setup. All participants in the cycle must be coinductive. But it's not clear to me how this leads to <code>where T: A, t: B</code> behaving differently from <code>T:A</code> and <code>T:B</code> (i.e., I'd expect the cycle to go through one of those two clauses, and for the cycle to be present regardless).</p>



<a name="164630607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630607">(May 01 2019 at 15:12)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="133169">@matklad</span> -- what is the issue that was plaguing you re: incremental results messing up trait resolution or method dispatch?</p>



<a name="164630610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630610">(May 01 2019 at 15:13)</a>:</h4>
<p>I feel like it may be connected to this problem i'm investigating</p>



<a name="164630713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630713">(May 01 2019 at 15:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/58291" target="_blank" title="https://github.com/rust-lang/rust/issues/58291">https://github.com/rust-lang/rust/issues/58291</a></p>



<a name="164630724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630724">(May 01 2019 at 15:14)</a>:</h4>
<p>well, if you read the first line of issue description....</p>



<a name="164630750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630750">(May 01 2019 at 15:14)</a>:</h4>
<p>you'll see that it was spawned from that problem :D</p>



<a name="164630775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630775">(May 01 2019 at 15:14)</a>:</h4>
<p>Heh, oh, well, that makes sense, doesn't it</p>



<a name="164630785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630785">(May 01 2019 at 15:15)</a>:</h4>
<p>it seems like there is a problem with the caching in the case of cycles</p>



<a name="164630796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164630796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164630796">(May 01 2019 at 15:15)</a>:</h4>
<p>among other things, I think it could lead to incorrect dep-node information</p>



<a name="164633400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633400">(May 01 2019 at 15:49)</a>:</h4>
<p>ok, taking some notes here</p>



<a name="164633401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633401">(May 01 2019 at 15:49)</a>:</h4>
<p>I think I see the problem</p>



<a name="164633427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633427">(May 01 2019 at 15:50)</a>:</h4>
<p>the evaluation cache is caching "over-eagerly"</p>



<a name="164633512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633512">(May 01 2019 at 15:50)</a>:</h4>
<p>this is causing other sorts of problems</p>



<a name="164633527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633527">(May 01 2019 at 15:50)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="116083">@pnkfelix</span> that the error we see invoking <code>foo.probe()</code> is actually the <strong>correct</strong> result</p>



<a name="164633535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164633535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164633535">(May 01 2019 at 15:50)</a>:</h4>
<p>roughly for the reasons you already diagnosed</p>



<a name="164634040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164634040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164634040">(May 01 2019 at 15:58)</a>:</h4>
<p>what we do now is this:</p>
<ul>
<li>evaluate <code>A: AutoTrait</code>, which requires <code>B: AutoTrait</code></li>
<li>evaluate <code>B: AutoTrait</code>, which requires <code>C: AutoTrait</code> and <code>D: NormalTrait</code></li>
<li>evaluate <code>C: AutoTrait</code>, which requires <code>A: AutoTrait</code> --<ul>
<li>this is a "co-inductive cycle" <code>(A, B, C, A): AutoTrait</code></li>
<li>thus we yield the result to be "ok" <strong>and we cache this</strong> (<code>C: AutoTrait =&gt; OK</code>)</li>
</ul>
</li>
<li>evaluate <code>D: NormalTrait</code>, which requires <code>A: AutoTrait</code> --<ul>
<li>this is a "non-co-inductive cycle", because of <code>D: NormalTrait</code></li>
<li>thus we yield the result to be "error"</li>
</ul>
</li>
<li>thus, <code>B: AutoTrait</code> is an error</li>
<li>and <code>A: AutoTrait</code> is an error</li>
</ul>
<p>but now we're in a weird state. We cached that <code>C: AutoTrait</code> holds, but that wouldn't be true if we had <em>started</em> from <code>C: AutoTrait</code>. </p>
<p>Seems obvious that this is wrong. It's the same problem of cyclic caching we encounter in lots of places. (Actually, it makes me want to review how I integrated coinduction into Chalk's SLG solver... man, I'd like to remove co-induction from auto traits, but let's leave that for another day.)</p>



<a name="164634049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164634049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164634049">(May 01 2019 at 15:58)</a>:</h4>
<p>I'm going to move this over into <a class="stream" data-stream-id="144729" href="/#narrow/stream/144729-wg-traits">#wg-traits</a> =)</p>



<a name="164634215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164634215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164634215">(May 01 2019 at 16:00)</a>:</h4>
<p>I’m going to have to go look up literature on mixing inductive and co-inductive reasoning</p>



<a name="164634244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164634244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164634244">(May 01 2019 at 16:01)</a>:</h4>
<p>this outcome remains non-obvious to me</p>



<a name="164634284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164634284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164634284">(May 01 2019 at 16:02)</a>:</h4>
<p>Well, that, or learn about how we would do auto traits without co-inductive reasoning</p>



<a name="164637448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164637448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164637448">(May 01 2019 at 16:48)</a>:</h4>
<blockquote>
<p>Well, that, or learn about how we would do auto traits without co-inductive reasoning</p>
</blockquote>
<p>that is tricky; I had some ideas that I wanted to explore, but it's a complex topic</p>



<a name="164637458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164637458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164637458">(May 01 2019 at 16:48)</a>:</h4>
<p>for now i'm aiming at a targeted fix for this caching problem</p>



<a name="164637468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164637468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164637468">(May 01 2019 at 16:48)</a>:</h4>
<p>I think the proper fix is to either move to chalk or rewrite the solver in a more global way</p>



<a name="164637671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164637671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164637671">(May 01 2019 at 16:51)</a>:</h4>
<blockquote>
<p>I’m going to have to go look up literature on mixing inductive and co-inductive reasoning</p>
</blockquote>
<p>there's not a lot on it, there's a paper or two</p>



<a name="164639493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164639493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164639493">(May 01 2019 at 17:19)</a>:</h4>
<p>so I have a simple fix; the bad news is that this may mess up salsa :) but I guess we can fix it</p>



<a name="164639496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164639496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164639496">(May 01 2019 at 17:19)</a>:</h4>
<p>(cc <span class="user-mention" data-user-id="133169">@matklad</span>)</p>



<a name="164662662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164662662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164662662">(May 01 2019 at 22:15)</a>:</h4>
<p>someone had a trick for some form of "negative reasoning" with non-auto-traits (by relying on an auto trait), I  wonder if it would be broken by this (sadly, I don't remember where it was)</p>



<a name="164693316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164693316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164693316">(May 02 2019 at 09:31)</a>:</h4>
<blockquote>
<p>But it's not clear to me how this leads to where T: A, t: B behaving differently from T:A and T:B (i.e., I'd expect the cycle to go through one of those two clauses, and for the cycle to be present regardless)</p>
</blockquote>
<p>Hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , how does your PR <a href="https://github.com/rust-lang/rust/issues/60444" target="_blank" title="https://github.com/rust-lang/rust/issues/60444">#60444</a> affect the question above? In particular, I <em>think</em> what it does is it changes the behavior for one of <code>T: A</code> or <code>T: B</code> when they are given on their own, but the test code you added did not exercise either of those cases, so I'm not certain.</p>



<a name="164705055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705055">(May 02 2019 at 12:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> indeed, my PR restores the property that you expected: that <code>T: A, T: B =&gt; T: A + B</code></p>



<a name="164705074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705074">(May 02 2019 at 12:55)</a>:</h4>
<p>the problem was that executing <code>T: A</code> was polluting the cache, such that <code>T: B</code> incorrectly succeeded (or something like that)</p>



<a name="164705539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705539">(May 02 2019 at 13:00)</a>:</h4>
<p><strong>that</strong> makes sense</p>



<a name="164705549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705549">(May 02 2019 at 13:00)</a>:</h4>
<p>though</p>



<a name="164705559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705559">(May 02 2019 at 13:00)</a>:</h4>
<p>I could have sworn I tried reordering the constraints in the source</p>



<a name="164705602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164705602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164705602">(May 02 2019 at 13:01)</a>:</h4>
<p>does such reordering not affect the order in which the clauses are traversed? I guess it would be silly for me to assume that would generally hold</p>



<a name="164709324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709324">(May 02 2019 at 13:49)</a>:</h4>
<p>we may do some reordering</p>



<a name="164709334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709334">(May 02 2019 at 13:49)</a>:</h4>
<p>and it may be that whichever one you did first</p>



<a name="164709341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709341">(May 02 2019 at 13:49)</a>:</h4>
<p>the pollution would affect the other</p>



<a name="164709391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709391">(May 02 2019 at 13:50)</a>:</h4>
<p>I was thinking aobut it this morning, I think i can make some simpler test cases</p>



<a name="164709397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709397">(May 02 2019 at 13:50)</a>:</h4>
<p>that also show the problem</p>



<a name="164709402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/164709402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#164709402">(May 02 2019 at 13:50)</a>:</h4>
<p>which I might try to do, just to have more coverage of the subtle cases</p>



<a name="165519287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165519287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165519287">(May 13 2019 at 11:31)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , do you think 6 regressions according to crater is low-risk enough to land PR <a href="https://github.com/rust-lang/rust/issues/60444" target="_blank" title="https://github.com/rust-lang/rust/issues/60444">#60444</a> ?</p>



<a name="165519379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165519379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165519379">(May 13 2019 at 11:33)</a>:</h4>
<p>I think it falls into "acceptable fallout", especially given how bad the kinds of bugs are that happen without this fix.</p>



<a name="165522797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165522797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165522797">(May 13 2019 at 12:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> also they seemed to be mostly fixable (I assume) by increasing the recursion limit ?</p>



<a name="165523770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165523770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165523770">(May 13 2019 at 12:36)</a>:</h4>
<p>(or maybe should we make sure those 6 are not uncovering an issue with the fix itself ?)</p>



<a name="165524695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524695">(May 13 2019 at 12:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> yes I have been assuming (but have not verified) that the regressions would be addressed by increasing the recursion limit</p>



<a name="165524701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524701">(May 13 2019 at 12:48)</a>:</h4>
<p>which makes me wonder whether we could/should make crater smart enough to attempt such responses</p>



<a name="165524772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524772">(May 13 2019 at 12:49)</a>:</h4>
<p>interesting thought, trying to rustfix the errors :)</p>



<a name="165524780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524780">(May 13 2019 at 12:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> is it possible to change the recursion limit through a rustc compiler flag?</p>



<a name="165524782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524782">(May 13 2019 at 12:49)</a>:</h4>
<p>(also when I looked at them I thought one of these 6 was a dupe of one of the other 5)</p>



<a name="165524907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524907">(May 13 2019 at 12:51)</a>:</h4>
<p>if that's the case you could start another crater run with the compiler flag to increase the limit and see if it's fixed</p>



<a name="165524928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165524928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165524928">(May 13 2019 at 12:51)</a>:</h4>
<p>(btw, crater is broken for all the new try builds until we figure out how to deal with a cargo regression)</p>



<a name="165525021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165525021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165525021">(May 13 2019 at 12:52)</a>:</h4>
<p>(i don't know whether the recursion-limit is accessible via a command line flag. It don't know of a reason why it shouldn't be, but that doesn't mean it is...)</p>



<a name="165550425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165550425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165550425">(May 13 2019 at 17:38)</a>:</h4>
<p>it's possible that recursion limit would help, not necessarily true</p>



<a name="165550437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165550437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165550437">(May 13 2019 at 17:38)</a>:</h4>
<p>in particular, if there is a legit cycle</p>



<a name="165550442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165550442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165550442">(May 13 2019 at 17:38)</a>:</h4>
<p>I think we may still report it that way</p>



<a name="165967331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165967331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165967331">(May 18 2019 at 09:35)</a>:</h4>
<p>Compiling rust-analyzer with the latest nightly takes a looong time, and fails with "overflowing evaluating requirenment".  Could this be a side-effect of <a href="https://github.com/rust-lang/rust/pull/60444" target="_blank" title="https://github.com/rust-lang/rust/pull/60444">https://github.com/rust-lang/rust/pull/60444</a>?</p>



<a name="165967620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165967620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165967620">(May 18 2019 at 09:44)</a>:</h4>
<p>ra issue: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1283" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/1283">https://github.com/rust-analyzer/rust-analyzer/issues/1283</a></p>



<a name="165968332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/165968332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#165968332">(May 18 2019 at 10:06)</a>:</h4>
<p>I am sending <a href="https://github.com/rust-analyzer/rust-analyzer/pull/1284" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/1284">https://github.com/rust-analyzer/rust-analyzer/pull/1284</a> to work around the issue, but I am curios to hear what is the proper fix?</p>



<a name="166064153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/166064153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#166064153">(May 20 2019 at 07:47)</a>:</h4>
<p>its certainly possible that the performance regression is due to PR <a href="https://github.com/rust-lang/rust/issues/60444" target="_blank" title="https://github.com/rust-lang/rust/issues/60444">#60444</a>; see in particular issue <a href="https://github.com/rust-lang/rust/issues/60846" target="_blank" title="https://github.com/rust-lang/rust/issues/60846">#60846</a></p>



<a name="166912267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/166912267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#166912267">(May 30 2019 at 14:27)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> we should take a look -- the cycle caching fix is basically closing off a soundness hole, so error described in <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1283" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/1283">rust-analyzer#1283</a> is probably <em>correct</em>, but we may be able to side-step it by adjusting other things</p>



<a name="166913129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/166913129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#166913129">(May 30 2019 at 14:37)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/1283" target="_blank" title="https://github.com/rust-lang/rust/issues/1283">#1283</a> does not look like a proper error though: it just aborts a very long computation. </p>
<p>I was secretly hoping that fixing <a href="https://github.com/rust-lang/rust/issues/60846" target="_blank" title="https://github.com/rust-lang/rust/issues/60846">#60846</a> will give us a real error message here, which should help to fix the issue :-)</p>



<a name="166913646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/166913646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#166913646">(May 30 2019 at 14:43)</a>:</h4>
<p>well, getting a better error may be something we could do more narrowly</p>



<a name="166914009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/166914009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#166914009">(May 30 2019 at 14:47)</a>:</h4>
<p>I wonder if with move to panic-based cancellation we should just require that keys &amp; values are unwind safe?</p>



<a name="167307707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/167307707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#167307707">(Jun 04 2019 at 15:50)</a>:</h4>
<p>Do we have any kind of "minimized" example of the perf problem here? Seems like <span class="user-mention" data-user-id="116466">@Zoxc</span> ran into something similar and a few others. I'm contemplating what I can do about it.</p>



<a name="167307736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/trait%20resolution%20regression%20%2360010/near/167307736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/trait.20resolution.20regression.20.2360010.html#167307736">(Jun 04 2019 at 15:51)</a>:</h4>
<p>I think I know the fix I want to do but it will take too long :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>